<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="text/javascript">
		class F {
			constructor() {
				this.x = '11';
				this.y = '22';
			}
			test() {
				console.log(this.x)
			}
		}
		var a = new F();
		class C extends F {
			//x,y其实可穿可不穿
			constructor() {
				super(); //其实x,y可以不要传入子类都可以拿得到
				this.z = this.x;
			}
			test() {
				console.log(this.z)
			}
		}
		var b = new C();
		console.log(b.test())
	</script>
</body>
</html>